      module mo_adjrxt
      private
      public :: adjrxt
      contains
      subroutine adjrxt( rate, inv, m, ncol, nlev )
      use shr_kind_mod, only : r8 => shr_kind_r8
      use chem_mods, only : nfs, rxntot
      implicit none
!--------------------------------------------------------------------
! ... dummy arguments
!--------------------------------------------------------------------
      integer, intent(in) :: ncol, nlev
      real(r8), intent(in) :: inv(ncol,nlev,nfs)
      real(r8), intent(in) :: m(ncol,nlev)
      real(r8), intent(inout) :: rate(ncol,nlev,rxntot)
      rate(:,:, 43) = rate(:,:, 43) * inv(:,:, 2)
      rate(:,:, 44) = rate(:,:, 44) * inv(:,:, 3)
      rate(:,:, 45) = rate(:,:, 45) * inv(:,:, 4)
      rate(:,:, 56) = rate(:,:, 56) * inv(:,:, 1)
      rate(:,:, 64) = rate(:,:, 64) * inv(:,:, 1)
      rate(:,:, 65) = rate(:,:, 65) * inv(:,:, 1)
      rate(:,:, 66) = rate(:,:, 66) * inv(:,:, 1)
      rate(:,:, 69) = rate(:,:, 69) * inv(:,:, 1)
      rate(:,:, 71) = rate(:,:, 71) * inv(:,:, 1)
      rate(:,:, 81) = rate(:,:, 81) * inv(:,:, 1)
      rate(:,:, 89) = rate(:,:, 89) * inv(:,:, 1)
      rate(:,:, 90) = rate(:,:, 90) * inv(:,:, 1)
      rate(:,:, 93) = rate(:,:, 93) * inv(:,:, 3)
      rate(:,:,104) = rate(:,:,104) * inv(:,:, 1)
      rate(:,:,109) = rate(:,:,109) * inv(:,:, 1)
      rate(:,:,115) = rate(:,:,115) * inv(:,:, 1)
      rate(:,:,141) = rate(:,:,141) * inv(:,:, 1)
      rate(:,:,175) = rate(:,:,175) * inv(:,:, 1)
      rate(:,:,176) = rate(:,:,176) * inv(:,:, 1)
      rate(:,:,211) = rate(:,:,211) * inv(:,:, 1)
      rate(:,:, 41) = rate(:,:, 41) * inv(:,:, 3) * inv(:,:, 1)
      rate(:,:, 42) = rate(:,:, 42) * m(:,:)
      rate(:,:, 46) = rate(:,:, 46) * m(:,:)
      rate(:,:, 47) = rate(:,:, 47) * m(:,:)
      rate(:,:, 48) = rate(:,:, 48) * m(:,:)
      rate(:,:, 49) = rate(:,:, 49) * m(:,:)
      rate(:,:, 50) = rate(:,:, 50) * m(:,:)
      rate(:,:, 51) = rate(:,:, 51) * m(:,:)
      rate(:,:, 52) = rate(:,:, 52) * m(:,:)
      rate(:,:, 53) = rate(:,:, 53) * m(:,:)
      rate(:,:, 54) = rate(:,:, 54) * m(:,:)
      rate(:,:, 55) = rate(:,:, 55) * m(:,:)
      rate(:,:, 56) = rate(:,:, 56) * m(:,:)
      rate(:,:, 57) = rate(:,:, 57) * m(:,:)
      rate(:,:, 58) = rate(:,:, 58) * m(:,:)
      rate(:,:, 59) = rate(:,:, 59) * m(:,:)
      rate(:,:, 60) = rate(:,:, 60) * m(:,:)
      rate(:,:, 61) = rate(:,:, 61) * m(:,:)
      rate(:,:, 62) = rate(:,:, 62) * m(:,:)
      rate(:,:, 63) = rate(:,:, 63) * m(:,:)
      rate(:,:, 64) = rate(:,:, 64) * m(:,:)
      rate(:,:, 66) = rate(:,:, 66) * m(:,:)
      rate(:,:, 67) = rate(:,:, 67) * m(:,:)
      rate(:,:, 68) = rate(:,:, 68) * m(:,:)
      rate(:,:, 69) = rate(:,:, 69) * m(:,:)
      rate(:,:, 70) = rate(:,:, 70) * m(:,:)
      rate(:,:, 72) = rate(:,:, 72) * m(:,:)
      rate(:,:, 73) = rate(:,:, 73) * m(:,:)
      rate(:,:, 74) = rate(:,:, 74) * m(:,:)
      rate(:,:, 75) = rate(:,:, 75) * m(:,:)
      rate(:,:, 76) = rate(:,:, 76) * m(:,:)
      rate(:,:, 77) = rate(:,:, 77) * m(:,:)
      rate(:,:, 78) = rate(:,:, 78) * m(:,:)
      rate(:,:, 79) = rate(:,:, 79) * m(:,:)
      rate(:,:, 80) = rate(:,:, 80) * m(:,:)
      rate(:,:, 81) = rate(:,:, 81) * m(:,:)
      rate(:,:, 82) = rate(:,:, 82) * m(:,:)
      rate(:,:, 83) = rate(:,:, 83) * m(:,:)
      rate(:,:, 84) = rate(:,:, 84) * m(:,:)
      rate(:,:, 85) = rate(:,:, 85) * m(:,:)
      rate(:,:, 87) = rate(:,:, 87) * m(:,:)
      rate(:,:, 88) = rate(:,:, 88) * m(:,:)
      rate(:,:, 89) = rate(:,:, 89) * m(:,:)
      rate(:,:, 90) = rate(:,:, 90) * m(:,:)
      rate(:,:, 91) = rate(:,:, 91) * m(:,:)
      rate(:,:, 92) = rate(:,:, 92) * m(:,:)
      rate(:,:, 95) = rate(:,:, 95) * m(:,:)
      rate(:,:, 96) = rate(:,:, 96) * m(:,:)
      rate(:,:, 97) = rate(:,:, 97) * m(:,:)
      rate(:,:, 98) = rate(:,:, 98) * m(:,:)
      rate(:,:, 99) = rate(:,:, 99) * m(:,:)
      rate(:,:,100) = rate(:,:,100) * m(:,:)
      rate(:,:,101) = rate(:,:,101) * m(:,:)
      rate(:,:,102) = rate(:,:,102) * m(:,:)
      rate(:,:,103) = rate(:,:,103) * m(:,:)
      rate(:,:,104) = rate(:,:,104) * m(:,:)
      rate(:,:,105) = rate(:,:,105) * m(:,:)
      rate(:,:,106) = rate(:,:,106) * m(:,:)
      rate(:,:,107) = rate(:,:,107) * m(:,:)
      rate(:,:,108) = rate(:,:,108) * m(:,:)
      rate(:,:,110) = rate(:,:,110) * m(:,:)
      rate(:,:,111) = rate(:,:,111) * m(:,:)
      rate(:,:,112) = rate(:,:,112) * m(:,:)
      rate(:,:,113) = rate(:,:,113) * m(:,:)
      rate(:,:,114) = rate(:,:,114) * m(:,:)
      rate(:,:,115) = rate(:,:,115) * m(:,:)
      rate(:,:,116) = rate(:,:,116) * m(:,:)
      rate(:,:,117) = rate(:,:,117) * m(:,:)
      rate(:,:,118) = rate(:,:,118) * m(:,:)
      rate(:,:,119) = rate(:,:,119) * m(:,:)
      rate(:,:,120) = rate(:,:,120) * m(:,:)
      rate(:,:,121) = rate(:,:,121) * m(:,:)
      rate(:,:,122) = rate(:,:,122) * m(:,:)
      rate(:,:,123) = rate(:,:,123) * m(:,:)
      rate(:,:,124) = rate(:,:,124) * m(:,:)
      rate(:,:,125) = rate(:,:,125) * m(:,:)
      rate(:,:,126) = rate(:,:,126) * m(:,:)
      rate(:,:,127) = rate(:,:,127) * m(:,:)
      rate(:,:,128) = rate(:,:,128) * m(:,:)
      rate(:,:,129) = rate(:,:,129) * m(:,:)
      rate(:,:,130) = rate(:,:,130) * m(:,:)
      rate(:,:,131) = rate(:,:,131) * m(:,:)
      rate(:,:,132) = rate(:,:,132) * m(:,:)
      rate(:,:,133) = rate(:,:,133) * m(:,:)
      rate(:,:,134) = rate(:,:,134) * m(:,:)
      rate(:,:,135) = rate(:,:,135) * m(:,:)
      rate(:,:,136) = rate(:,:,136) * m(:,:)
      rate(:,:,137) = rate(:,:,137) * m(:,:)
      rate(:,:,138) = rate(:,:,138) * m(:,:)
      rate(:,:,139) = rate(:,:,139) * m(:,:)
      rate(:,:,140) = rate(:,:,140) * m(:,:)
      rate(:,:,141) = rate(:,:,141) * m(:,:)
      rate(:,:,142) = rate(:,:,142) * m(:,:)
      rate(:,:,143) = rate(:,:,143) * m(:,:)
      rate(:,:,144) = rate(:,:,144) * m(:,:)
      rate(:,:,145) = rate(:,:,145) * m(:,:)
      rate(:,:,146) = rate(:,:,146) * m(:,:)
      rate(:,:,147) = rate(:,:,147) * m(:,:)
      rate(:,:,148) = rate(:,:,148) * m(:,:)
      rate(:,:,149) = rate(:,:,149) * m(:,:)
      rate(:,:,150) = rate(:,:,150) * m(:,:)
      rate(:,:,151) = rate(:,:,151) * m(:,:)
      rate(:,:,152) = rate(:,:,152) * m(:,:)
      rate(:,:,153) = rate(:,:,153) * m(:,:)
      rate(:,:,154) = rate(:,:,154) * m(:,:)
      rate(:,:,155) = rate(:,:,155) * m(:,:)
      rate(:,:,156) = rate(:,:,156) * m(:,:)
      rate(:,:,157) = rate(:,:,157) * m(:,:)
      rate(:,:,158) = rate(:,:,158) * m(:,:)
      rate(:,:,159) = rate(:,:,159) * m(:,:)
      rate(:,:,160) = rate(:,:,160) * m(:,:)
      rate(:,:,161) = rate(:,:,161) * m(:,:)
      rate(:,:,162) = rate(:,:,162) * m(:,:)
      rate(:,:,163) = rate(:,:,163) * m(:,:)
      rate(:,:,164) = rate(:,:,164) * m(:,:)
      rate(:,:,165) = rate(:,:,165) * m(:,:)
      rate(:,:,166) = rate(:,:,166) * m(:,:)
      rate(:,:,167) = rate(:,:,167) * m(:,:)
      rate(:,:,168) = rate(:,:,168) * m(:,:)
      rate(:,:,169) = rate(:,:,169) * m(:,:)
      rate(:,:,170) = rate(:,:,170) * m(:,:)
      rate(:,:,171) = rate(:,:,171) * m(:,:)
      rate(:,:,172) = rate(:,:,172) * m(:,:)
      rate(:,:,173) = rate(:,:,173) * m(:,:)
      rate(:,:,174) = rate(:,:,174) * m(:,:)
      rate(:,:,175) = rate(:,:,175) * m(:,:)
      rate(:,:,177) = rate(:,:,177) * m(:,:)
      rate(:,:,178) = rate(:,:,178) * m(:,:)
      rate(:,:,179) = rate(:,:,179) * m(:,:)
      rate(:,:,180) = rate(:,:,180) * m(:,:)
      rate(:,:,181) = rate(:,:,181) * m(:,:)
      rate(:,:,182) = rate(:,:,182) * m(:,:)
      rate(:,:,183) = rate(:,:,183) * m(:,:)
      rate(:,:,184) = rate(:,:,184) * m(:,:)
      rate(:,:,185) = rate(:,:,185) * m(:,:)
      rate(:,:,186) = rate(:,:,186) * m(:,:)
      rate(:,:,187) = rate(:,:,187) * m(:,:)
      rate(:,:,188) = rate(:,:,188) * m(:,:)
      rate(:,:,189) = rate(:,:,189) * m(:,:)
      rate(:,:,190) = rate(:,:,190) * m(:,:)
      rate(:,:,191) = rate(:,:,191) * m(:,:)
      rate(:,:,192) = rate(:,:,192) * m(:,:)
      rate(:,:,193) = rate(:,:,193) * m(:,:)
      rate(:,:,194) = rate(:,:,194) * m(:,:)
      rate(:,:,195) = rate(:,:,195) * m(:,:)
      rate(:,:,196) = rate(:,:,196) * m(:,:)
      rate(:,:,197) = rate(:,:,197) * m(:,:)
      rate(:,:,198) = rate(:,:,198) * m(:,:)
      rate(:,:,204) = rate(:,:,204) * m(:,:)
      rate(:,:,205) = rate(:,:,205) * m(:,:)
      rate(:,:,206) = rate(:,:,206) * m(:,:)
      rate(:,:,207) = rate(:,:,207) * m(:,:)
      rate(:,:,208) = rate(:,:,208) * m(:,:)
      rate(:,:,211) = rate(:,:,211) * m(:,:)
      rate(:,:,212) = rate(:,:,212) * m(:,:)
      end subroutine adjrxt
      end module mo_adjrxt
